//
//  ATShareFootView.m
//  Adorable_Things
//
//  Created by lanou on 16/1/15.
//  Copyright © 2016年 Banana Inc. All rights reserved.
//

#import "ATShareFootView.h"

@implementation ATShareFootView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        
        UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(0, 10, kWidth, 20)];
        lab.text = @"据说分享有金币拿";
        lab.textAlignment = NSTextAlignmentCenter;
        lab.textColor = [UIColor grayColor];
        lab.font = [UIFont systemFontOfSize:14];
        [self addSubview:lab];
        
        self.weixinBut = [UIButton buttonWithType:(UIButtonTypeCustom)];
        self.weixinBut.frame = CGRectMake(30, lab.bottom + 10, (kWidth - 180) / 5, (kWidth - 180) / 5);
        self.weixinBut.layer.cornerRadius = (kWidth - 180) / 10;
        self.weixinBut.layer.masksToBounds = YES;
        [self.weixinBut setImage:[UIImage imageNamed:@"iconfont-weixin"] forState:(UIControlStateNormal)];
        [self addSubview:self.weixinBut];
        
        UILabel *weixinLab = [[UILabel alloc]initWithFrame:CGRectMake(self.weixinBut.left, self.weixinBut.bottom + 3, self.weixinBut.width, 10)];
        weixinLab.textAlignment = NSTextAlignmentCenter;
        weixinLab.text = @"微信";
        weixinLab.textColor = [UIColor grayColor];
        weixinLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:weixinLab];
        
         self.friendBut = [UIButton buttonWithType:(UIButtonTypeCustom)];
        self.friendBut.frame = CGRectMake(30 + self.weixinBut.right, lab.bottom + 10, (kWidth - 180) / 5, (kWidth - 180) / 5);
        self.friendBut.layer.cornerRadius = (kWidth - 180) / 10;
        self.friendBut.layer.masksToBounds = YES;
        [self.friendBut setImage:[UIImage imageNamed:@"iconfont-pengyouquan"] forState:(UIControlStateNormal)];
       [self addSubview:self.friendBut];
        
        UILabel *friendLab = [[UILabel alloc]initWithFrame:CGRectMake(self.friendBut.left, self.friendBut.bottom + 3, self.friendBut.width, 10)];
        friendLab.textAlignment = NSTextAlignmentCenter;
        friendLab.text = @"朋友圈";
        friendLab.textColor = [UIColor grayColor];
        friendLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:friendLab];
        
         self.weibo = [UIButton buttonWithType:(UIButtonTypeCustom)];
        self.weibo.frame = CGRectMake(30 + self.friendBut.right, lab.bottom + 10, (kWidth - 180) / 5, (kWidth - 180) / 5);
        self.weibo.layer.cornerRadius = (kWidth - 180) / 10;
        self.weibo.layer.masksToBounds = YES;
        [self.weibo setImage:[UIImage imageNamed:@"iconfont-weibo-2"] forState:(UIControlStateNormal)];
        [self addSubview:self.weibo];
        UILabel *weiboLab = [[UILabel alloc]initWithFrame:CGRectMake(self.weibo.left, self.weibo.bottom + 3 , self.weibo.width, 10)];
        weiboLab.textAlignment = NSTextAlignmentCenter;
        weiboLab.text = @"微博";
        weiboLab.textColor = [UIColor grayColor];
        weiboLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:weiboLab];
        
         self.QQBut = [UIButton buttonWithType:(UIButtonTypeCustom)];
        self.QQBut.frame = CGRectMake(30 + self.weibo.right, lab.bottom + 10, (kWidth - 180) / 5, (kWidth - 180) / 5);
        self.QQBut.layer.cornerRadius = (kWidth - 180) / 10;
        self.QQBut.layer.masksToBounds = YES;
        [self.QQBut setImage:[UIImage imageNamed:@"iconfont-QQ-2"] forState:(UIControlStateNormal)];
       [self addSubview:self.QQBut];
        UILabel *QQLab = [[UILabel alloc]initWithFrame:CGRectMake(self.QQBut.left - 5, self.QQBut.bottom + 3, self.QQBut.width + 10, 10)];
        QQLab.textAlignment = NSTextAlignmentCenter;
        QQLab.text = @"QQ好友";
        QQLab.textColor = [UIColor grayColor];
        QQLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:QQLab];
        
         self.QQzoneBut = [UIButton buttonWithType:(UIButtonTypeCustom)];
        self.QQzoneBut.frame = CGRectMake(30 + self.QQBut.right, lab.bottom + 10, (kWidth - 180) / 5, (kWidth - 180) / 5);
        self.QQzoneBut.layer.cornerRadius = (kWidth - 180) / 10;
        self.QQzoneBut.layer.masksToBounds = YES;
        [self.QQzoneBut setImage:[UIImage imageNamed:@"iconfont-qqkongjian"] forState:(UIControlStateNormal)];
       [self addSubview:self.QQzoneBut];
        UILabel *QQzoneLab = [[UILabel alloc]initWithFrame:CGRectMake(self.QQzoneBut.left - 5, self.QQzoneBut.bottom + 3, self.QQzoneBut.width + 10, 10)];
        QQzoneLab.textAlignment = NSTextAlignmentCenter;
        QQzoneLab.text = @"QQ空间";
        QQzoneLab.textColor = [UIColor grayColor];
        QQzoneLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:QQzoneLab];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
